﻿using Furion;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using System;

namespace UpperComputer.EntityFramework.Core
{
    public class UpperComputerEntityFrameworkCoreServiceComponent : IServiceComponent
    {
        public void Load(IServiceCollection services, ComponentContext componentContext)
        {
            IConfiguration configuration = App.Configuration;
            //注册系统数据库访问对象
            services.AddDatabaseAccessor(configuration.GetConnectionString("MasterConnectionString"), configuration.GetConnectionString("SlaveConnectionString"));
        }
    }
}
